package com.ce.entity;

import java.io.Serializable;

import org.json.JSONObject;

import com.ce.utils.RefrectObject;

public class Common implements Serializable {
	private static final long serialVersionUID = 3450610227699671207L;
	private int autoId;
	private int itemId;
	private int userId;
	private float score;
	private String cmTime;
	private String content;
	private String itemName;
	private String userName;
	private String itemFilePath;

	public Common() {
		super();
	}
	public Common(int autoId, int itemId, int userId, float score,
			String cmTime, String content, String itemName, String userName,
			String itemFilePath) {
		super();
		this.autoId = autoId;
		this.itemId = itemId;
		this.userId = userId;
		this.score = score;
		this.cmTime = cmTime;
		this.content = content;
		this.itemName = itemName;
		this.userName = userName;
		this.itemFilePath = itemFilePath;
	}

	public int getAutoId() {
		return autoId;
	}

	public void setAutoId(int autoId) {
		this.autoId = autoId;
	}

	public int getItemId() {
		return itemId;
	}

	public void setItemId(int itemId) {
		this.itemId = itemId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public float getScore() {
		return score;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public String getCmTime() {
		return cmTime;
	}

	public void setCmTime(String cmTime) {
		this.cmTime = cmTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getItemFilePath() {
		return itemFilePath;
	}

	public void setItemFilePath(String itemFilePath) {
		this.itemFilePath = itemFilePath;
	}
	
	public void initObjectByJson(JSONObject jsonObject) {
		if(jsonObject == null)
			throw new RuntimeException("JsonObject is null!");
		RefrectObject.initObjForJson(this, jsonObject);
	}
}
